package com.hmall.api.config;

import com.hmall.api.FallbackFactory.CartFallbackFactory;
import com.hmall.api.FallbackFactory.ItemFallbackFactory;
import com.hmall.api.interceptor.FeignUserInterceptor;
import feign.Logger;
import org.springframework.context.annotation.Bean;

public class FeignDefaultConfig {
    @Bean
    public Logger.Level level(){
        return Logger.Level.FULL;
    }

    @Bean
    public FeignUserInterceptor feignUserInterceptor(){
        return new FeignUserInterceptor();
    }
    @Bean
    public ItemFallbackFactory itemFallbackFactory(){

        return new ItemFallbackFactory();
    }
    @Bean
    public CartFallbackFactory cartFallbackFactory(){
        
        return new CartFallbackFactory();
    }
}
